import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  head: [
    [
      'link',
      {
        rel: 'icon',
        href: 'https://wy.huiguanjia.cn/9ad134a361f8d778/file/images/936952704248143872',
      },
    ],
    [
      'meta',
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no',
      },
    ],
  ],
  title: '绘管家规范',
  description: '企业级开发规范',
  srcDir: 'src',
  themeConfig: {
    logo: 'https://wy.huiguanjia.cn/9ad134a361f8d778/file/images/936952704248143872',
    lastUpdated: {
      formatOptions: {
        dateStyle: 'short',
        timeStyle: 'medium',
      },
      text: '最后更新于',
    },
    nav: [
      { text: '首页', link: '/' },
      {
        activeMatch: '^/project/',
        link: '/project/',
        text: '文档',
      },
      {
        activeMatch: '^/guide',
        text: '开发规范',
        items: [
          {
            activeMatch: '^/guide/vue',
            link: '/guide/vue/index',
            text: 'VUE 规范',
          },
          {
            activeMatch: '^/files',
            link: '/files',
            text: '文件规范',
          },
          {
            activeMatch: '^/guide/ui-ux',
            link: '/guide/ui-ux/content/index',
            text: 'UI/UX 规范',
          },
        ],
      },
      {
        activeMatch: '^/components',
        text: '组件',
        link: '/components/m-password-input/',
      },
    ],

    sidebar: {
      '/guide/vue/': {
        base: '/guide/vue/',
        items: [
          {
            collapsed: false,
            text: 'VUE 开发规范',
            link: '/index',
          },
        ],
      },
      '/project/': {
        base: '/project/',
        items: [
          {
            collapsed: false,
            text: '项目',
            link: '/index',
          },
          {
            collapsed: false,
            text: 'Git 规范',
            link: '/git',
          },
          {
            collapsed: false,
            text: '代码检查',
            link: '/code-lint',
          },
          {
            text: '代码更新',
            link: '/git-update',
          },
          {
            collapsed: false,
            text: '其他',
            items: [],
          },
        ],
      },
      '/guide/ui-ux/': {
        base: '/guide/ui-ux/',
        items: [
          {
            text: '文案',
            link: '/content/',
          },
          {
            text: '色彩',
            link: '/color',
          },
          {
            text: '页面',
            link: '/page/',
          },
          {
            text: '表单',
            link: '/form/',
          },
          {
            text: '查询表单',
            link: '/query-form/',
          },
          {
            text: '模态框/抽屉',
            link: '/modal/',
          },
          {
            text: '标签页',
            link: '/tabs/',
          },
          {
            text: '表格',
            link: '/table/',
          },
          {
            text: '按钮',
            link: '/button/',
          },
          {
            text: '标题',
            link: '/title/',
          },
          {
            text: '字体',
            link: '/font/',
          },
        ],
      },
      '/components/': {
        base: '/components/',
        items: [
          {
            text: '金额',
            link: '/m-money/',
          },
          {
            text: '密码输入框',
            link: '/m-password-input/',
          },
          {
            text: '图片上传',
            link: '/m-image-upload/',
          },
          {
            text: '模态框',
            link: '/m-modal/',
          },
          {
            text: '抽屉',
            link: '/m-drawer/',
          },
          {
            text: '单选按钮',
            link: '/m-radio-button/',
          },
          {
            text: '空数据',
            link: '/m-empty/',
          },
          {
            text: '标签页',
            link: '/m-tabs/',
          },
          {
            text: '表格',
            link: '/m-table/',
          },
          {
            text: '章节标题',
            link: '/m-section-title/',
          },
          {
            text: '卡片',
            link: '/m-card/',
          },
          {
            text: '富文本',
            link: '/m-rich-text/',
          },
          {
            text: '视频',
            link: '/m-video/',
          },
          {
            text: '标签',
            link: '/m-tags/',
          },
        ],
      },
    },

    socialLinks: [{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }],
  },
})
